import React from 'react';
import ScollListRow0 from '../../newsList/components/scollListRow0';
import ScollListRow1 from '../../newsList/components/scollListRow1';
import ScollListRow2 from '../../newsList/components/scollListRow2';
import { ScollListRow0ul } from '../../newsList/style';
import { HotWrap } from '../style';
import { List } from 'antd-mobile';
const Item = List.Item;
function Adlist(props) {
    let { data, type } = props
    type = Number(type)
    return (
        <HotWrap>
            <List className="my-list">
                <Item arrow="horizontal" extra={'更多'}>热1门推荐</Item>
            </List>
            <ScollListRow0ul>
                {data.map(
                    (rowData, rowID) => {
                        if (type === 0) {
                            return (
                                <ScollListRow0 i={rowData} type={type} index={rowID} key={rowID} />
                            );
                        } else if (type === 1) {
                            return (
                                <ScollListRow1 i={rowData} type={type} index={rowID} key={rowID} />
                            );
                        } else {
                            return (
                                <ScollListRow2 i={rowData} type={type} index={rowID} key={rowID} />
                            );
                        }
                    }
                )}
            </ScollListRow0ul>
        </HotWrap>);
}
export default Adlist
